package Exam;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @Author Kechelle
 * @Date 2020/9/28 19:12
 * @Version 1.0
 */
public class Three {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = Integer.parseInt(scanner.nextLine());
        String[] strs = scanner.nextLine().split(" ");
        StringBuilder builder = new StringBuilder();
        for (int i=0;i< strs.length;i++){
            builder.append(strs[i]);
        }
        long startTime = System.currentTimeMillis();
        System.out.println(function(builder.toString(),num));
        long endTime = System.currentTimeMillis();
        System.out.println(endTime-startTime);
    }

    public static String function(String str,int num){

        StringBuilder builder = new StringBuilder();
        String reverse = str.substring(0,num);
        String join = str.substring(num,str.length());
        StringBuffer buffer = new StringBuffer(reverse).reverse();
        builder.append(join).append(buffer);
        String res = builder.toString();
        StringBuilder sb = new StringBuilder();
        for (int i=0;i<res.length();i++){
            sb.append(res.charAt(i)).append(" ");
        }
        return sb.toString().trim();
    }


    /*
    int t;
        for (int i=0;i<num/2;i++){
            t = nums[i];
            nums[i] = nums[num-i-1];
            nums[num-i-1] = t;
        }
        StringBuilder builder = new StringBuilder();
        for (int i=0;i<nums.length;i++){
            builder.append(nums[i]).append(" ");
        }
        return builder.substring(0,builder.length()).toString();
     */
}
